package xcmg.device.dao.mapper.basic;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.basic.MaterialsSupplierDO;
import xcmg.device.service.vo.basic.MaterialsSupplierVO;

import java.util.List;

/**
 * @author wangyong
 */
@Mapper
public interface MaterialsSupplierMapper {

  MaterialsSupplierDO selectByPrimaryKey(@Param("id") String id);

  List<MaterialsSupplierDO> list(MaterialsSupplierVO materialsSupplierVO);

  int deleteByPrimaryKey(@Param("id") String id);

  int deleteByMaterialsId(@Param("materialsId") String materialsId);

  int insert(MaterialsSupplierDO materialsSupplierDO);

  MaterialsSupplierDO getByMaterialsIdAndSupplierCode(@Param("materialsId") String materialsId,
      @Param("supplierCode") String supplierCode);

  MaterialsSupplierDO findBySupplierOrgId(@Param("supplierOrgId") String supplierOrgId, @Param("orgId") String orgId, @Param("materialsNo") String materialsNo);

  MaterialsSupplierDO findBySupplierOrgIdAndSalesCode(@Param("supplierOrgId") String supplierOrgId, @Param("orgId") String orgId, @Param("materialsNo") String materialsNo,@Param("salesCode") String salesCode);


}
